package com.test0109;

public class Test01 {
    public static void main(String[] args) {
        // (1)统计字符串中某个数字出现的次数
        String s = "1827314132131453645234323";
        int i = m(s, 3);
        System.out.println(i);
    }
    public static int m(String s,int a){
        char[] cArr = s.toCharArray();
        int count=0;
        for(char c:cArr){
            if(c==a){
                count++;
            }
        }
        return count;
    }

}
